{% extends 'generic.html' %}
{% load i18n %} {# Translating code #}

{% block cssBlock %}
	<link href="/media/css/{{request.session.theme}}/pageProfile/style.css" type="text/css" rel="stylesheet"/>
	<link href="/media/css/{{request.session.theme}}/pageForm/style.css" type="text/css" rel="stylesheet"/>
{% endblock %}

{% block article %}
	{% if user.is_authenticated %}
		<p>{% blocktrans %}Welcome, {% endblocktrans %}{{user.email}} </p>
	{% else %}
		<form action="." method="POST">
		{% csrf_token %}
		{% if request.GET.next %}
			<input type="hidden" value="{{request.GET.next}}" name="next"> 
		{% endif %}
		<p class="explanation">{% blocktrans %}To enter this platform you need to specify your user (e-mail) and password.{% endblocktrans %}</p>
		<p class="explanation">{% blocktrans %}If you forgot your password,{% endblocktrans %} <a href="/accounts/password/reset/">{% blocktrans %}click here{% endblocktrans %}</a>.</p>
		{{form.non_field_errors}}
		<table>
			<tr>
				<td>
					{{form.username.label_tag}}
				</td>
				<td>
					{{form.username}}
				</td>
				<td>
					{{form.username.errors}}
				</td>
			</tr>
			<tr>
				<td>
					{{form.password.label_tag}}:
				</td>
				<td>
					{{form.password}}
				</td>
				<td>
					{{form.password.errors}}
				</td>
			</tr>
		
		</table>
		<input type="submit"/>
		</form>
	{% endif %}

{% endblock %}
